package com.zjc.tcploadbalance.config;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Configuration;

@Configuration
public class InstanceConfig {

    @Value("${tcp-load-balanc.instance-id.ip}")
    private String ip;
    @Value("${tcp-load-balanc.instance-id.port}")
    private int port;

    public String getIp() {
        return ip;
    }

    public void setIp(String ip) {
        this.ip = ip;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    public String getInstanceId() {
        return ip + ":" + port;
    }

}
